<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="security" uri="http://www.enersun.com.cn/security" %>
<%@taglib prefix="h" uri="/syzg-html"%>

<!DOCTYPE html>
<html>
	<head>
		<%@ include file="/base/jsp/common/CommonListTop.jsp"%>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>系统管理-审计日志</title>
		<link href="${ctx}/base/css/common.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/base/css/${customTheme}.css" rel="stylesheet" type="text/css" />
		<script src="${ctx}/base/js/base.js" type="text/javascript"></script>
		<script src="${ctx}/base/js/common/FormFunction.js" type="text/javascript"></script>
		<script src="${ctx}/baseNew/plugins/jQuery/jQuery-2.2.0.min.js"></script>
		<link href="${ctx}/baseNew/bootstrap/css/bootstrap.min.css" rel="stylesheet">
		<script src="${ctx}/baseNew/bootstrap/js/bootstrap.js" type="text/javascript"></script>
    	<link href="${ctx}/baseNew/other/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
		<script src="${ctx}/baseNew/other/js/bootstrap-datetimepicker.js" type="text/javascript"></script>
		<script src="${ctx}/baseNew/other/js/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
		<link rel="stylesheet" href="${ctx}/baseNew/dist/css/AdminLTE.min.css">
  		<script src="${ctx}/baseNew/other/js/bootbox.min.js" type="text/javascript"></script>
  		<link rel="stylesheet" href="${ctx}/baseNew/validator/css/bootstrapValidator.css"/>
		<script type="text/javascript" src="${ctx}/baseNew/validator/js/bootstrapValidator.js"></script>
		<link rel="stylesheet" href="${ctx}/zenithsun/css/admin-imgList.css"/>
		<!-- 公用的按钮函数 -->
		<style type="text/css">
			.select-box{
				width: 100px;
				height: 24px;
			}
			.btn-search{
				width: 50px;
				height: 24px;
			}
		</style>
		<script>
			var listUrl = "${ctx}/sys/audit/list";//表单列表list 的url地址,用来作为搜索地址
			function search() {
				$('#audit-form').action = listUrl;
				$('#audit-form').submit();
			}
		</script>
	</head>

	<body class="rightBody">
		<form name="searchForm" id="audit-form" method="post" action="" class="form-inline">
			<table width="100%" class="title" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <th>
				 	 	<img src="${ctx}/zenithsun/images/back.png" width="26" height="26" alt="图标 " class="icon" />
						<em class="headTips">系统管理</em> &gt; 审计日志
				  </th>
				  <th width="200"></th>
				</tr>
				<tr>
				<td>
				    <div class="form-group">
				      <security:CSRF/>
					  <!-- <input type="text" name="person.account" id="personId" class="form-control input-sm" placeholder="操作人"/> -->
					  类型:<select name="type" id="type" class="select-box" >
					  	<option value=""></option>
					  	<option value="登录" <c:if test="${audit.type eq '登录'}"> selected="selected"</c:if> >登录</option>
					  	<option value="登出" <c:if test="${audit.type eq '登出'}"> selected="selected"</c:if> >登出</option>
					  	<option value="新增" <c:if test="${audit.type eq '新增'}"> selected="selected"</c:if> >新增</option>
					  	<option value="修改" <c:if test="${audit.type eq '修改'}"> selected="selected"</c:if> >修改</option>
					  	<option value="删除" <c:if test="${audit.type eq '删除'}"> selected="selected"</c:if> >删除</option>
					  </select>
					  结果:<select name="flag" id="flag" class="select-box">
					  	<option value=""></option>
					  	<option value="SUCCESS" <c:if test="${audit.flag eq 'SUCCESS'}"> selected="selected"</c:if> >成功</option>
					  	<option value="FAILURE" <c:if test="${audit.flag eq 'FAILURE'}"> selected="selected"</c:if> >失败</option>
					  </select>
					  <button type="button" class="btn-search" onclick="search()">搜索</button>
				    </div>
				 </td>
				 	<td align="right">
				    <div class="form-group">
				    </div>
				  </td>
				</tr>
			</table>
			<h:table cssClass="table table-bordered table-hover table-striped" cssStyle="margin-bottom:-5px;">
                <h:column headerTitle="操作人" width="10%">
                    ${o.person.account}
                </h:column>
                <h:column headerTitle="操作" width="10%">
                    ${o.type}
                </h:column>
                <h:column headerTitle="描述" width="30%">
                    ${o.operateDescribe}
                </h:column>
                <h:column headerTitle="执行时间" width="20%">
                    ${o.date}
                </h:column>
                 <h:column headerTitle="终端IP" width="10%">
                    <c:choose>
                		<c:when test="${o.clientIp eq '0:0:0:0:0:0:0:1' }">localhost</c:when>
                		<c:otherwise>${o.clientIp }</c:otherwise>
                	</c:choose>
                </h:column>
                <h:column headerTitle="结果" width="80" >
                	<c:choose>
                		<c:when test="${o.flag eq 'SUCCESS' }">成功</c:when>
                		<c:when test="${o.flag eq 'FAILURE' }">失败</c:when>
                		<c:otherwise>${o.flag }</c:otherwise>
                	</c:choose>
				</h:column>
			</h:table>
			<table width="100%" class="pageDown" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="right">
						<h:pager /> &nbsp;
					</td>
				</tr>
			</table>
		</form>
		<%@ include file="/base/jsp/common/CommonListFoot.jsp"%>
	</body>
</html>
